<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\User;

/**
 * 解谜记录
 */
class Record extends Model
{
    use HasFactory, SoftDeletes;

    protected $table = 'record';
    protected $guarded = [];
    protected $hidden = [
        'deleted_at'
    ];

    const CREATED_AT = 'create_time';
    const UPDATED_AT = 'update_time';

    public function user()
    {
        return $this->belongsTo(User::class, 'user_id', 'id');
    }
}
